# Makefile for libipvs

CC		= @CC@
CFLAGS		= @CFLAGS@ @CPPFLAGS@ -D@USE_NL@ -Wall -Wunused

CFLAGS += -I ../../../../include
CFLAGS += -I ./libsockopt

export OBJS += libipvs.a

STATIC_LIB	= libipvs.a

all:		$(STATIC_LIB)

test: sockopt.o test.o
		$(CC) $(CFLAGS) -o $@ $^

$(STATIC_LIB):	sockopt.o libipvs.o ip_vs_nl_policy.o
		ar rv $@ $^
		rm $^

%.o:		%.c
		$(CC) $(CFLAGS) -c -o $@ $<

clean:
		rm -f *.[ao] *~ *.orig *.rej core

distclean:	clean
